#include <iostream>
#include "vectorfunctions.h"
int myunion(int x[], int y[], int m, int n, int u[])
{
	int i, length;
	for(i=0;i<m;i++)
		u[i]=x[i];
	length=m;
	for(i=0;i<n;i++)
		if (no_in_vector(u, length, y[i])<0){
			u[length]=y[i];
			++length;
		}
		
			
return length;
}

int main()
{
	int m, n, l;
	int a[100], b[100], u[100];
	cout<<"Length of set A : ";
	cin>>m;
	readVector(a, m);
	cout<<"Length of set B : ";
	cin>>n;
	readVector(b, n);
	l= myunion(a, b, m, n, u);
	printVector(u, l);
return 0;
}

